package fr.umlv.j2ee.patterns.transfertobject;

import java.io.Serializable;



/**design pattern TransfertObject
 * permet d'encapsuler des donnees metier pour limiter le trafic reseau et simplifier les methodes
 * 
 * @author kirin
 *
 */
public class Account implements Serializable{
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 3895487074651619610L;
	
	private final  String firstName;
	private final  String lastName;
	private final  String email;
	
	
	public Account(String firstName, String lastName, String email) {
		super();
		this.firstName = firstName;
		this.lastName = lastName;
		this.email = email;
	}


	public String getFirstName() {
		return firstName;
	}


	public String getLastName() {
		return lastName;
	}


	public String getEmail() {
		return email;
	}


	/**
	 * Constructs a <code>String</code> with all attributes
	 * in name = value format.
	 *
	 * @return a <code>String</code> representation 
	 * of this object.
	 */
	public String toString()
	{
	    final String TAB = "    ";
	    
	    String retValue = "";
	    
	    retValue = "Account ( "
	        + super.toString() + TAB
	        + "firstName = " + this.firstName + TAB
	        + "lastName = " + this.lastName + TAB
	        + "email = " + this.email + TAB
	        + " )";
	
	    return retValue;
	}
	
	
	

}
